#include "bits/stdc++.h"
using namespace std;
using ll = long long;
const int N = 20009; //100005

int isprime[N],prime[N];
int n;
int x,y,z;
int cnt = 1;

void is_prime(int n)
{
	prime[0] = 2;
	for(int i=2;i<=n;i++)
	{
		if(isprime[i]==0)
		{
			prime[cnt++] = i;
			for(int j=i;j<=n;j+=i)
			{
				isprime[j] = 1; 
			}
		}
	}
}

int search(int l,int r,int snum)
{
	int where = -1;
	while(l<=r)
	{
		int mid = l + (r-l)/2;
		if(prime[mid] == snum)
		{
			where = mid;
			break;
		}
		else if(prime[mid] < snum)
		{
			l = mid + 1;
		}
		else
		{
			r = mid - 1;
		}
	}
	return where;
}

int main()
{
	ios::sync_with_stdio(0);
	cin.tie(0),cout.tie(0);
	cin >> n;
	is_prime(n);
	bool flag = false;
	int local;
	for(int i=0;i<=cnt;i++)
	{
		x = prime[i];
		//y+z = n - x;
		for(int j=i;j<cnt;j++)
		{
			y=prime[j];
			local = search(j,cnt-1,n-x-y);
			if(local != -1)
			{
				z = prime[local];
				flag = true;
				break;
			}
		}
		if(flag)
		{
			break;
		}
	}
	cout << x << " " << y << " " << z;
	return 0;
}
